﻿#region

using System;
using System.Collections.Generic;
using TvdbLib.Data;

#endregion

namespace TvdbLib
{
    /// <summary>
    ///     TvdbData contains a list of series, a list of languages and a list of mirror
    /// </summary>
    [Serializable]
    public class TvdbData
    {
        #region Fields

        private List<TvdbLanguage> m_langInfo;
        private DateTime m_lastUpdated;

        #endregion Fields

        #region Constructors

        /// <summary>
        ///     TvdbData constructor
        /// </summary>
        public TvdbData()
        {
            m_lastUpdated = new DateTime(1, 1, 1);
        }

        /// <summary>
        ///     TvdbData constructor
        /// </summary>
        /// <param name="_language"> List of available languages </param>
        public TvdbData(List<TvdbLanguage> _language)
            : this()
        {
            m_langInfo = _language;
        }

        #endregion Constructors

        #region Properties

        /// <summary>
        ///     List of all available languages
        /// </summary>
        public List<TvdbLanguage> LanguageList
        {
            get { return m_langInfo; }
            set
            {
                m_langInfo = value;
                Util.LanguageList = value;
            }
        }

        /// <summary>
        ///     When was the last time thetvdb has been checked
        ///     for updates
        /// </summary>
        public DateTime LastUpdated
        {
            get { return m_lastUpdated; }
            set { m_lastUpdated = value; }
        }

        #endregion Properties
    }
}